import { InjectionKey, Ref } from 'vue';
import { createContext, useContext } from '@/hooks/core/useContext';
export interface AppProviderContextProps {
  prefixCls: Ref<string>;
  isMobile: Ref<boolean>;
}

export function useDesign(scope: string) {
  const key: InjectionKey<AppProviderContextProps> = Symbol();
  const values =  useContext<AppProviderContextProps>(key);
  return {
    prefixCls: `${values.prefixCls}-${scope}`,
    prefixVar: values.prefixCls,
  };
}
